FROM openjdk:8-jdk-alpine
MAINTAINER realife.com
EXPOSE 9020
WORKDIR /
ENV agent.service_name=eson-sensor
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ADD ./run.sh /
RUN mkdir /config && chmod 777 /run.sh
COPY ./target/eson-sensor.jar   /app.jar
ENTRYPOINT [ "sh", "-c", "/run.sh" ]


##==================axpaas================================
#FROM registry.essence.com.cn/galaxy-public/skywalking-agent-sidecar-noenv-release:6.6.0-7 as skywalkingbuilder
#FROM repo.essence.com.cn/docker/openjdk:8-jdk-alpine
#WORKDIR /
#ENV agent.service_name=application-center
#ENV TZ=Asia/Shanghai
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#COPY --from=skywalkingbuilder /data /root
#COPY application-center-runner-k8s/target/appcenter-runner-k8s.jar /app.jar
#COPY application-center-runner-k8s/run.sh /run.sh
#RUN chmod 777 /run.sh
#CMD ["/bin/sh", "-c", "/run.sh"]

